import http from '@/utils/request';

export default {
	exportOrderList:(params) =>{//订单导出
		return http.get('/wx/v1/order/exportOrder', {
			params,
		})
	},
	getOrderList: (params) => {//订单列表
		return http.get('/wx/v1/order/page', {
			params
		})
	},
	getOrderDetail: (params) => {
		return http.get('/wx/v1/order', {})
	},
	getStatisticsData: (params) => {//订单统计
		return http.get('/wx/v1/business/getStatisticsData', { params })
	},
	getOrder: (params) => {//订单详情
		return http.get('/wx/v1/order', {
			params
		})
	},
	getListOper: (params) => {//订单跟踪
		return http.get('/wx/v1/orderOperation/listByOrderId', {
			params
		})
	},
	takeOrders: (data) => {//商家接单
		return http.put('/wx/v1/order/takeOrders', data)
	},

	cancelOrder: (data) => {//取消订单
		return http.put('/wx/v1/order/cancelOrder', data)
	},
	orderChangePrice: (data) => {//修改价格
		return http.put('/wx/v1/order/orderChangePrice', data)
	},
	setOrderAttr: (data) => {//编辑订单信息
		return http.put('/wx/v1/orderAttr/setOrderAttr', data)
	},
	getPayWxUrlById: (params) => {//查询支付二维码
		return http.get('/wx/v1/beeper/getPayWxUrlById', {
			params
		})
	},
	orderOperate: (data) => {//订单操作-服务员
		return http.put('/wx/v1/order/orderOperate', data)
	},
	saleReturn: (data) => {//退款
		return http.put('/wx/v1/order/salesReturn', data)
	},
	idNameTree: (params) => {//下单页商品分类
		return http.get('/wx/v1/serverClassify/idNameTree', {
			params
		})
	},
	listCalculateData: (data) => {//结算查询商品列表
		return http.post('/wx/v1/order/listCalculateData', data)
	},
	shoppingAddOrder: (data) => {//加单下单
		return http.post('/wx/v1/order/shoppingAddOrder', data)
	},
	listIdName: (params = {}) => {//产品管理类型查询
		return http.get('/wx/v1/serverClassify/listIdName', params)
	},
	batchUpdateSaleState: (data) => {//商品上下架
		return http.put('/wx/v1/goods/batchUpdateSaleState', data)
	},
	timingOrderOperate: (data) => {//开始 & 结束计时
		return http.post('/wx/v1/order/timingOrderOperate', data)
	},
	affirmOrder: (data) => {//是否同意用户取消订单
		return http.put('/wx/v1/order/customerAffirmOrder', data)
	},
	logOrder: (params) => {//打印订单
		return http.get('/wx/v1/order/orderPrint', {
			params
		})
	},
	printStatistics:(params)=>{
		return http.get('/wx/v1/order/printStatistics',{params})
	},
	setExpectedTime:(data)=>{
		return http.put('/wx/v1/order/setExpectedTime',data)
	},
}
